const db = require('./db')

module.exports = function promise(sql){
    let promise = new Promise((resolve, reject) => {
      db(sql, (err, data) => {
        if(err) throw err;
        resolve(data);
      })
    })
    return promise;
} 